package com.thtf.strokeinquiry.app.bean.resp;



import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description = "返回公共响应")
public class CommResponse<T> {
    private T data ;
    @ApiModelProperty(name="返回服务code值")
    private String code = "0";
    @ApiModelProperty(name="返回服务器信息")
    private String msg = "Success";


    public CommResponse(){

    }
    public CommResponse(T t) {
        this.data = t;
    }

    public String getCode() {
        return code;
    }

    public CommResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public CommResponse(ServerCode severCode){
        this.code=severCode.getCode();
        this.msg=severCode.getMsg();
    }

}
